package hcn.protocol.ods.returnVisit;


import org.apache.commons.lang3.StringUtils;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

/**
 * @description 在线审方审核列表返回临时实体
 * @author zhaorb
 * @create 2019/10/28 11:15
 **/
@XmlRootElement(name = "PrescriptionList")
public class PrescriptionResponseTemporary implements Serializable {
    private String prescriptionId;
    private String patientId;
    private String patientName;
    private String patientSex;
    private String patientAge;
    private String prescriptionDate;
    private String prescriptionNumber;
    private String doctorId;
    private String prescriptionDoctorName;
    private String outpatientNumber;
    private String departmentName;
    private String departmentId;
    private String pharmacyCode;
    private String irritabilityDrug;
    private String diagnosticCode;
    private String diagnosticName;
    private String feeNature;
    private String auditor;
    private String auditMind;
    private String auditDate;
    private String numberOfPackets;
    private String prescriptionType;
    private String boilSign;
    private String auditStatus;
    private String medicalCardId;
    private String address;
    private String clinicalDiagnose;
    private List<PrescriptionDrugTemp> prescriptionDrugList;

    @XmlElement(name = "PrescriptionRecordId")
    public String getPrescriptionId() {
        return prescriptionId;
    }

    public void setPrescriptionId(String prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    @XmlElement(name = "Name")
    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    @XmlElement(name = "Sex")
    public String getPatientSex() {
        return patientSex;
    }

    public void setPatientSex(String patientSex) {
        this.patientSex = patientSex;
    }

    @XmlElement(name = "Age")
    public String getPatientAge() {
        return patientAge;
    }

    public void setPatientAge(String patientAge) {
        this.patientAge = patientAge;
    }

    @XmlElement(name = "PrescriptionDate")
    public String getPrescriptionDate() {
        return prescriptionDate;
    }

    public void setPrescriptionDate(String prescriptionDate) {
        this.prescriptionDate = prescriptionDate;
    }

    @XmlElement(name = "RecipeNumber")
    public String getPrescriptionNumber() {
        return prescriptionNumber;
    }

    public void setPrescriptionNumber(String prescriptionNumber) {
        this.prescriptionNumber = prescriptionNumber;
    }

    public String getPrescriptionDoctorName() {
        return prescriptionDoctorName;
    }

    public void setPrescriptionDoctorName(String prescriptionDoctorName) {
        this.prescriptionDoctorName = prescriptionDoctorName;
    }

    public String getOutpatientNumber() {
        return outpatientNumber;
    }

    public void setOutpatientNumber(String outpatientNumber) {
        this.outpatientNumber = outpatientNumber;
    }

    @XmlElement(name = "VisitDeptName")
    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    @XmlElement(name = "VisitDeptId")
    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    @XmlElement(name = "PharmacyId")
    public String getPharmacyCode() {
        return pharmacyCode;
    }

    public void setPharmacyCode(String pharmacyCode) {
        this.pharmacyCode = pharmacyCode;
    }

    public String getIrritabilityDrug() {
        return irritabilityDrug;
    }

    public void setIrritabilityDrug(String irritabilityDrug) {
        this.irritabilityDrug = irritabilityDrug;
    }

    public String getDiagnosticCode() {
        return diagnosticCode;
    }

    public void setDiagnosticCode(String diagnosticCode) {
        this.diagnosticCode = diagnosticCode;
    }

    public String getDiagnosticName() {
        return diagnosticName;
    }

    public void setDiagnosticName(String diagnosticName) {
        this.diagnosticName = diagnosticName;
    }

    public String getFeeNature() {
        return feeNature;
    }

    public void setFeeNature(String feeNature) {
        this.feeNature = feeNature;
    }

    public String getAuditor() {
        return auditor;
    }

    public void setAuditor(String auditor) {
        this.auditor = auditor;
    }

    public String getAuditMind() {
        return auditMind;
    }

    public void setAuditMind(String auditMind) {
        this.auditMind = auditMind;
    }

    public String getAuditDate() {
        return auditDate;
    }

    public void setAuditDate(String auditDate) {
        this.auditDate = auditDate;
    }

    public String getNumberOfPackets() {
        if (StringUtils.isNotEmpty(numberOfPackets)) {
            return numberOfPackets;
            //若是处方节点没有，那么就从药品节点获取草药贴数
        } else if (null != prescriptionDrugList && prescriptionDrugList.size() > 0) {
            return prescriptionDrugList.get(0).getNumberOfPackets();
        }
        return null;
    }

    public void setNumberOfPackets(String numberOfPackets) {
        this.numberOfPackets = numberOfPackets;
    }

    @XmlElement(name = "DrugType")
    public String getPrescriptionType() {
        return prescriptionType;
    }

    public void setPrescriptionType(String prescriptionType) {
        this.prescriptionType = prescriptionType;
    }

    @XmlElement(name = "BoilSign")
    public String getBoilSign() {
        return boilSign;
    }

    public void setBoilSign(String boilSign) {
        this.boilSign = boilSign;
    }

    @XmlElement(name = "AuditStatus")
    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    @XmlElementWrapper(name = "PrescriptionDrugs")
    @XmlElement(name = "PrescriptionDrug")
    public List<PrescriptionDrugTemp> getPrescriptionDrugList() {
        return prescriptionDrugList;
    }

    public void setPrescriptionDrugList(List<PrescriptionDrugTemp> prescriptionDrugList) {
        this.prescriptionDrugList = prescriptionDrugList;
    }

    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }

    public String getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }

    @XmlElement(name = "MedicalCardID")
    public String getMedicalCardId() {
        return medicalCardId;
    }

    public void setMedicalCardId(String medicalCardId) {
        this.medicalCardId = medicalCardId;
    }

    @XmlElement(
            name = "Address"
    )
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    @XmlElement(
            name = "ClinicalDiagnose"
    )
    public String getClinicalDiagnose() {
        return clinicalDiagnose;
    }

    public void setClinicalDiagnose(String clinicalDiagnose) {
        this.clinicalDiagnose = clinicalDiagnose;
    }


    @Override
    public String toString() {
        return "PrescriptionResponseTemporary{" +
                "prescriptionId='" + prescriptionId + '\'' +
                ", patientId='" + patientId + '\'' +
                ", patientName='" + patientName + '\'' +
                ", patientSex='" + patientSex + '\'' +
                ", patientAge='" + patientAge + '\'' +
                ", prescriptionDate='" + prescriptionDate + '\'' +
                ", prescriptionNumber='" + prescriptionNumber + '\'' +
                ", doctorId='" + doctorId + '\'' +
                ", prescriptionDoctorName='" + prescriptionDoctorName + '\'' +
                ", outpatientNumber='" + outpatientNumber + '\'' +
                ", departmentName='" + departmentName + '\'' +
                ", departmentId='" + departmentId + '\'' +
                ", pharmacyCode='" + pharmacyCode + '\'' +
                ", irritabilityDrug='" + irritabilityDrug + '\'' +
                ", diagnosticCode='" + diagnosticCode + '\'' +
                ", diagnosticName='" + diagnosticName + '\'' +
                ", feeNature='" + feeNature + '\'' +
                ", auditor='" + auditor + '\'' +
                ", auditMind='" + auditMind + '\'' +
                ", auditDate='" + auditDate + '\'' +
                ", numberOfPackets='" + numberOfPackets + '\'' +
                ", prescriptionType='" + prescriptionType + '\'' +
                ", boilSign='" + boilSign + '\'' +
                ", auditStatus='" + auditStatus + '\'' +
                ", medicalCardId='" + medicalCardId + '\'' +
                ", address='" + address + '\'' +
                ", clinicalDiagnose='" + clinicalDiagnose + '\'' +
                ", prescriptionDrugList=" + prescriptionDrugList +
                '}';
    }
}
